<%@ page language="java" import="java.util.*,com.usermgr.bean.*" pageEncoding="UTF-8"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="m" uri="mytaguri" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'UserList.jsp' starting page</title>
    
  
	  <script LANGUAGE="JavaScript">

    function del(){
        
        if(window.confirm("确实要删除吗？")){
     		return true;
        }else{
            return false;
        }
    }

</script>
    
  </head>
  
  <body bgcolor="#FAFBE7">
   <center>
   	<form action="" method="post">
				<div align="center">
				
				
				<table border="0" bordercolor="#8CB7C9" cellpadding="1" cellspacing="1" background="#FF0000">
				
				<tr>
					<td style="border: 1px solid #009999">用户ID</td>
					<td style="border: 1px solid #009999">用户名</td>
					<td style="border: 1px solid #009999">用户类型</td>
					<td style="border: 1px solid #009999">用户状态</td>
					<td style="border: 1px solid #009999">注册时间</td>
					<td style="border: 1px solid #009999">操作</td>
				</tr>
				
				
				<m:split pageSize="${ 8 }" date="${ requestScope.userList }">
					<tr>
    				<td  style="border: 1px solid #009999"> ${ dataRow.ofId } </td>
    				<td  style="border: 1px solid #009999"> ${ dataRow.ofName } </td>
    				<td  style="border: 1px solid #009999"> ${ dataRow.ofPermission } </td>
    				<td  style="border: 1px solid #009999"> ${ dataRow.ofStatus } </td>
    				<td  style="border: 1px solid #009999"><fmt:formatDate value="${ dataRow.ofTime }" pattern="yyyy-MM-dd HH:mm:ss"/>  </td>
    				<td  style="border: 1px solid #009999">
    			<s:if test="${ dataRow.ofPermission  eq '0'}">
					<a href="deleteUser.action?ofId=${ dataRow.ofId }" onclick="return del()">删除</a>
				</s:if>
				<s:else >
				  &nbsp;&nbsp;&nbsp;&nbsp;
				</s:else>
					
					
					
					</td>
			 		
    			</tr>
				
				
				</m:split>
					<tr>
						<td colspan="6" align="right"  style="border: 1px solid #009999">
						<a href='getAllUser.action?currentPage=1'>首页</a>
						<a href='getAllUser.action?currentPage=${ currentPage-1 }'>上一页</a>
						<a href='getAllUser.action?currentPage=${ currentPage+1 }'>下一页</a>
						<a href='getAllUser.action?currentPage=${ totalPage }'>尾页</a>
						${ currentPage }/${ totalPage }页
						</td>
					</tr>
					</table>
					
				</div>
			</form>
   
   </center>
  </body>
</html>
